package com.learn.springlearn.config;

import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@Configuration
public class RepeatBeanConfig {


    @Bean
    public F master(){
        F f = new F();
        f.setName("master");
        return f;
    }

    @Bean
    public F slave(){
        F f = new F();
        f.setName("slave");
        return f;
    }

    @Data
    public class F {
        String name;
    }
}
